import {projectName} from './constant/constant'
import {getSession} from "./utils/MUtils";

export default {
  methods: {
    hasAuth(perm) {
      // return true;
      let userButtonListStr = getSession(projectName + "UserButtonList");
      if (userButtonListStr == null) {
        return false
      }
      let userButtonList = JSON.parse(userButtonListStr);
      return userButtonList.indexOf(perm) >= 0
    },
    goMHome(){
      this.$router.replace('/MMain/MIndex')
    },
    isNotEmpt(value){
      if(value == null || value == ''){
        return false;
      }
      return true;
    }
  }
}
